package com.example.stlink.fragments;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;

import com.example.stlink.R;

public class CourseSelectedStuFragment extends Fragment {

    private static AppCompatActivity mAppCompatActivity;

    private ConstraintLayout stu1;
    private ConstraintLayout stu2;
    private ConstraintLayout stu3;


    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_course_selected_stu, container, false);
        initView(view);
        return view;
    }

    /**
     * 堆外暴露的一个方法，用于获取该碎片实例
     * @param str 说明
     * @param appCompatActivity 上下文
     * @return 未结课的碎片实例
     */
    public static CourseSelectedStuFragment newInstance(String str, AppCompatActivity appCompatActivity){
        CourseSelectedStuFragment courseSelectedStuFragment = new CourseSelectedStuFragment();
        mAppCompatActivity = appCompatActivity;
        return courseSelectedStuFragment;
    }


    /**
     * 绑定控件，初始化实例等
     * @param view 当前视图
     */
    private void initView(View view) {
        stu1 = view.findViewById(R.id.stu_1);
        stu2 = view.findViewById(R.id.stu_2);
        stu3 = view.findViewById(R.id.stu_3);
        setClickListener();
    }

    private void setClickListener(){
        stu1.setOnClickListener(v -> {

        });
        stu2.setOnClickListener(v -> {

        });
        stu3.setOnClickListener(v -> {

        });
    }

}
